<%@ page pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@include file="/views/inc/taglib.inc" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://jakarta.apache.org/taglibs/string-1.1" prefix="str" %>
<%@ taglib uri="vote/taglib" prefix="vote"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@include file="/views/inc/static.inc" %>
<link href="${HomeUrl}/views/css/manager.css" rel="stylesheet" type="text/css"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>我的问卷</title>
</head>
<body>

<%@include file="/views/inc/user.inc" %>
<br />
<img src='${HomeUrl}/views/images/logo.jpg' width="1000"/>
<br />
	<div class="body">
		<%@include file="/views/inc/msgbox.inc" %>
		<%@include file="/views/inc/grouplist.inc" %>
		<div class = "bnav">
			<a href="${HomeUrl}">首页</a>&raquo;<a href="#">我的问卷</a>
		</div>
		<div class="leftpanel">
			<div class="manager_nav">
				<h2 class="m_select">我的问卷</h2>
				<h2><a href="${HomeUrl}/qmanager/create">新问卷</a></h2>
				<div class="count">一共${qCount}个问卷</div>
				<div class="none"></div>
			</div>
			<ul class="manager_body">
				<c:forEach items="${qList}" var="item">
				<li>
					<div class="qHead">
						问卷名：${item.questionnaireName}&nbsp;
						<c:if test="${item.questionnaireStatus == 1}"><span>(${item.questionnaireCount}人参与)</span></c:if>
					</div>
					问卷状态：
					<c:choose>
						<c:when test="${item.questionnaireStatus == 1}">在线</c:when>
						<c:when test="${item.questionnaireStatus == 0}">下线</c:when>
					</c:choose>
					&nbsp;&nbsp;&nbsp;&nbsp;问卷分类：${item.questionnaireGroupName}
					<br/>
					创建时间：<fmt:formatDate pattern="yyyy-MM-dd hh:mm:ss" value="${item.questionnaireTime}" />
					
					<div class="qCtrl">
					操作：
					<c:choose>
						<c:when test="${item.questionnaireStatus == 1}">
							<a href="${HomeUrl}/qmanager/offline/${item.questionnaireId}">下线</a>
						</c:when>
						<c:when test="${item.questionnaireStatus == 0}">
							<a href="${HomeUrl}/qmanager/online/${item.questionnaireId}">上线</a>
						</c:when>
					</c:choose>
					<a href="${HomeUrl}/qmanager/delete/${item.questionnaireId}">删除</a><br/>
					</div>
				</li>
				</c:forEach>
			</ul>
			<div class="pager"><vote:pager url="${HomeUrl}/qmanager/" count="${qCount}" curpage="${curpage}" itemPerPage="${itemPerPage}" /></div>
		</div>
		<div class="rightpanel">
			<div class="hotandlast_questionnaire">
			<%@include file="/views/inc/hotandlastest.inc"%></div>
		</div>
		<div class="none"></div>
	</div>
	<%@include file="/views/inc/copyright.inc" %>
</body>
</html>